[rig-claude] Improve Claude dynamic-workflow compatibility for rig - #361
Merged
Merged
Conversation
…le link Close the discoverability gap in claude-workflow-conversion.md: - Add 'Incremental migration with rig/globals' section showing the flat-module porting pattern (import call/pipeline from rig/globals at top level) - Add sample 360-parallel-branch-analysis-workflow.md to the example table so parallel(thunks) barrier usage is cross-referenced from the conversion guide Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ |
Contributor
Author
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /grill-with-docs — approving with one minor prose-code mismatch noted.
📋 Key Themes & Highlights
Finding
- Prose/code mismatch: Line 158 lists
parallelas a third import from"rig/globals", but the code example on line 164 only importscallandpipeline. Minor, but worth fixing to keep the guide trustworthy as a reference.
Positive Highlights
- ✅ The new section fills a genuine gap: flat-module porting pattern was undocumented in the conversion guide
- ✅ Clear graduation advice (
"rig/globals" is a stepping stone, not a final form) sets correct expectations - ✅ Sample 360 cross-reference correctly points to the
parallel(thunks)barrier pattern - ✅ File stays within the ~200-line guidance target (171 → 204 lines)
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 25 AIC · ⌖ 4.12 AIC · ⊞ 6.3K
Comment /matt to run again
|
|
||
| ```ts | ||
| import { agent, phase, log, s } from "rig"; | ||
| import { call, pipeline } from "rig/globals"; |
Contributor
Author
There was a problem hiding this comment.
[/grill-with-docs] The prose (line 158) mentions parallel as one of three imports, but the code example only imports call and pipeline — parallel is absent from both the import and the example body.
Either drop parallel from the prose to match the example, or add it to the import and show a usage so the claim matches the code.
💡 Minimal fix — drop from prose
-`call`, `pipeline`, and `parallel` from `"rig/globals"` instead of
+`call` and `pipeline` from `"rig/globals"` instead of
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Compatibility gap addressed
claude-workflow-conversion.md— the primary reference for porting Claude Code dynamic workflow scripts to rig — did not document the"rig/globals"incremental migration path. A developer porting a flat script (with top-levelphase,call,pipelinecalls) had no clear guide in the conversion reference, only a brief mention buried indynamic-workflows.md.Why this improves transfer
Claude dynamic workflows are flat scripts:
phase(),log(), andawait agent(prompt, { schema })appear at the module top level with no wrappingbody. The natural first step when porting is to keep that flat structure and swap the injected globals for imports —call/pipelinefrom"rig/globals",phase/logfrom"rig". Without this documented in the conversion guide, developers either miss the pattern entirely or must infer it from a prose aside in a different reference file.The added section names
"rig/globals"explicitly, shows a minimal working example, and explains when to graduate toworkflow({ body }).Files changed
skills/rig/references/claude-workflow-conversion.mdtsexample showing the flat-module porting pattern360-parallel-branch-analysis-workflow.mdto the example table (parallel(thunks)barrier pattern was missing from the cross-reference)Validation
Docs-only change. No TypeScript or sample files modified; no build or test run required per task rules. Verified:
360-parallel-branch-analysis-workflow.mdexistsRemaining intentional differences
{ effort: "high" }remains "not modeled" — rig has no effort parameter; encode importance via model choice or prompt structure{ agentType: "Explore" }remains "prompt wording" — no built-in read-only agent type